package com.atguigu.gmall.feign.search;

import com.atguigu.gmall.common.result.Result;
import com.atguigu.gmall.search.entity.Goods;
import com.atguigu.gmall.search.vo.SearchParamVo;
import com.atguigu.gmall.search.vo.SearchRespVo;
import org.springframework.cloud.openfeign.FeignClient;
import org.springframework.web.bind.annotation.*;

/**
 * @author tangsy
 * @Description TODO
 * @date 2022/12/12 18:56
 * @Version 1.0
 */
@RequestMapping("api/inner/rpc/search")
@FeignClient("service-search")
public interface SearchFeignClient {

    @PostMapping("/searchgoods")
    Result<SearchRespVo> search(@RequestBody SearchParamVo vo);

    @PostMapping("/up/goods")
    Result up(@RequestBody Goods goods);

    @GetMapping("/down/goods/{skuId}")
    Result down(@PathVariable("skuId")Long skuId);

    @GetMapping("/hotscore/{skuId}/{score}")
    Result updateHotScore(@PathVariable("skuId") Long skuId ,@PathVariable("score") Long score);

}
